# 打印阶乘运算
import math

x = eval(input())
for i in range(1, x+1):
    print("{}!=".format(i), end="")
    print("1", end="")
    for j in range(2, i+1):
        print("*{}".format(j), end="")
    print("={}".format(math.factorial(i)))